from math import sqrt

MetersInLatitudeInSPb = 111000
MetersInLongitudeInSPb = 56000


def calcVectorInMetersBetweenTwoGeoCoords(lat1, lon1, lat2, lon2):
    x = (lon2 - lon1) * MetersInLongitudeInSPb
    y = (lat2 - lat1) * MetersInLatitudeInSPb
    return x, y

def vector2dLength(x, y):
    return sqrt(x*x + y*y)

def vector2dNormalize(x, y):
    length = vector2dLength(x, y)
    nX = x / length
    nY = y / length
    return nX, nY